QT -= gui
QT += network

TEMPLATE = lib
DEFINES += QTE_NETWORK_LIBRARY

TARGET = QTENetwork

include(../pri/qt-e.pri)

SOURCES += \
	jntpsocket.cpp \
	jicmpsocket.cpp

HEADERS += \
	qtenetworkglobal.h \
	jntpsocket.h \
	jicmpsocket.h \
	private/jicmpsocket_p.h

unix {
	SOURCES += \
		private/jicmpsocket_unix.cpp

	LIBS += -L$${DESTDIR}/../lib -lQTECore

	QMAKE_POST_LINK += \  # sh / bash
		mkdir -p $${includeInstallPath}/QTENetwork && \
		cp -fP $${proIncludePath}/QTENetwork/* $${includeInstallPath}/QTENetwork && \
		cp -fP $${sourceDir}/QTENetwork/*.h $${includeInstallPath}/QTENetwork
}

win32 {
	SOURCES += \
		private/jicmpsocket_win.cpp

	LIBS += -L$${DESTDIR}\..\lib -lQTECore

	QMAKE_POST_LINK += \  # dos
		$${proRootDir}\bin\mkdir.bat $${includeInstallPath}\QTENetwork && \
		xcopy $${proIncludePath}\QTENetwork\* $${includeInstallPath}\QTENetwork /y /a && \
		xcopy $${sourceDir}\QTENetwork\*.h $${includeInstallPath}\QTENetwork /y /a
}
